package jvan.org;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@SpringBootApplication
public class MainApplication {

	@Autowired
	private AuthorSettings authorSettings;

	public static void main(String[] args) {
		SpringApplication.run(MainApplication.class, args);
	}

	//访问地址http://127.0.0.1:8080/
	@RequestMapping(value = "/")
	String index(){
		return authorSettings.getName()+":"+authorSettings.getAge();
	}
}
